# Default Pipeline settings
# 
# Author: Bastian R. Angermann
###############################################################################

#' The default location to which PrococolApplications should write their logs.
#' 
#' Set to log.txt in the current directory.
logFile <- "log.txt"

#' Number of cores on which a pipeline should be run using the SNOW library. 
#' 
#' Use of multiple hosts will be implemented in the future. Defaults to 1
computeNodeNo <- 1

#' set compute node number
#' 
#' Must be larger or equal to 1
#' @param number the number of processes that run simultaneously 
setcomputeNodeNo <- function(number)
{
    assignInNamespace("computeNodeNo", number, "drDobus")
}

#' set log file location
#' 
#' a.
#' @param file a character string specifying the location to the log file
setLogFileLocation <- function(file)
{
    assignInNamespace("logFile", file, "drDobus")
}

#' Get log file location.
#' 
#' Returns the location of the log file.
getLogFileLocation <- function()
{
    return(logFile)
}

protocolSchema <- NULL
## The schema describing a protocol(application), called pipeline in the GP language.
## 
## NOT USED XML parsing is not implemented yet.
#.onLoad <- function(libname, pkgname)
#{
#    require(XML)
#    filename <- file.path(libname,pkgname,"XSD","ProtocolApplication.xsd")
#    pipelineSchema <- xmlSchemaParse(file=filename)
#    assignInNamespace("pipelineSchema", pipelineSchema, "drDobus")
#}
